# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=libmediaart
pkgver=1.9.5
pkgrel=1
pkgdesc="Library tasked with managing, extracting and handling media art caches"
url="https://git.gnome.org/browse/libmediaart"
arch=(x86_64)
license=(LGPL)
depends=(gdk-pixbuf2)
makedepends=(vala gobject-introspection git gtk-doc meson)
_commit=c2286151ad85592ecd412787ca71cb998b09c9d5  # tags/1.9.5^0
source=("git+https://gitlab.gnome.org/GNOME/libmediaart.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build -D gtk_doc=true
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}
